import request from "@/utils/request";

export const getConfigList = (params) => {
  return request({
    url: "/info/link/list",
    method: "get",
    params,
  });
};

export const addConfig = (data) => {
  return request({
    url: "/info/link",
    method: "post",
    data,
  });
};

export const editConfig = (data) => {
  return request({
    url: "/info/link",
    method: "put",
    data,
  });
};

export const toggleStatus = (data) => {
  return request({
    url: "/info/link/updateStatus",
    method: "put",
    data,
  });
};

export const getDetail = (id) => {
  return request({
    url: `/info/link/${id}`,
    method: "get",
  });
};
